package ve.usb.ddp.hibernate;

import ve.usb.cohesion.runtime.LocalDate;import java.util.HashSet;
import java.util.Set;

public class Pai implements java.io.Serializable, ve.usb.cohesion.runtime.Auditable {

    /** Creates a new instance of Pai */
    public Pai() {}
    
    /**
     * Holds value of property id.
     */
    private Long id;

    /**
     * Getter for property id.
     * @return Value of property id.
     */
    public Long getId() {
        return this.id;
    }

    /**
     * Holds value of property idPai.
     */
    private long idPai;

    /**
     * Getter for property idPai.
     * @return Value of property idPai.
     */
    public long getIdPai() {
        return this.idPai;
    }

    /**
     * Setter for property idPai.
     * @param idPai New value of property idPai.
     */
    public void setIdPai(long idPai) {
        this.id = this.idPai = idPai;
    }

    /**
     * Holds value of property fec_Ini.
     */
    private java.util.Date fec_Ini;

    /**
     * Getter for property fec_Ini.
     * @return Value of property fec_Ini.
     */
    public java.util.Date getFec_Ini() {
        return this.fec_Ini;
    }

    /**
     * Setter for property fec_Ini.
     * @param fec_Ini New value of property fec_Ini.
     */
    public void setFec_Ini(java.util.Date fec_Ini) {
        if (fec_Ini==null || fec_Ini instanceof LocalDate)
            this.fec_Ini = fec_Ini;
        else this.fec_Ini = new LocalDate(fec_Ini);
    }

    /**
     * Holds value of property fec_Fin.
     */
    private java.util.Date fec_Fin;

    /**
     * Getter for property fec_Fin.
     * @return Value of property fec_Fin.
     */
    public java.util.Date getFec_Fin() {
        return this.fec_Fin;
    }

    /**
     * Setter for property fec_Fin.
     * @param fec_Fin New value of property fec_Fin.
     */
    public void setFec_Fin(java.util.Date fec_Fin) {
        if (fec_Fin==null || fec_Fin instanceof LocalDate)
            this.fec_Fin = fec_Fin;
        else this.fec_Fin = new LocalDate(fec_Fin);
    }

    /**
     * Holds value of property articulo8.
     */
    private boolean articulo8;

    /**
     * Getter for property articulo8.
     * @return Value of property articulo8.
     */
    public boolean getArticulo8() {
        return this.articulo8;
    }

    /**
     * Setter for property articulo8.
     * @param articulo8 New value of property articulo8.
     */
    public void setArticulo8(boolean articulo8) {
        this.articulo8 = articulo8;
    }

    /**
     * Holds value of property profesor.
     */
    private Profesor profesor;

    /**
     * Getter for property profesor.
     * @return Value of property profesor.
     */
    public Profesor getProfesor() {
        return this.profesor;
    }

    /**
     * Setter for property profesor.
     * @param profesor New value of property profesor.
     */
    public void setProfesor(Profesor profesor) {
        this.profesor = profesor;
    }
    /**
     * Holds value of property set_Resolucion.
     */
    private Set<PaiResolucion> set_Resolucion = new HashSet<PaiResolucion>();

    /**
     * Getter for property set_Resolucion.
     * @return Value of property set_Resolucion.
     */
    public Set<PaiResolucion> getSet_Resolucion() {
        return this.set_Resolucion;
    }

    /**
     * Setter for property set_Resolucion.
     * @param set_Resolucion New value of property set_Resolucion.
     */
    public void setSet_Resolucion(Set<PaiResolucion> set_Resolucion) {
        this.set_Resolucion = set_Resolucion;
    }

    /**
     * Add an element to set property set_Resolucion
     * and sets elements's property pai.
     * @param element New element to be added to set_Resolucion.
     */
    public void addToSet_Resolucion(PaiResolucion element) {
        element.setPai(this);
        set_Resolucion.add(element);
    }

    /**
     * Removes and old element from set set_Resolucion
     * and sets element's property pai to null.
     * @param old The element to be removed from set_Resolucion
     */
    public void removeFromSet_Resolucion(PaiResolucion old) {
        set_Resolucion.remove(old);
        old.setPai(null);
    }
    /**
     * Holds value of property set_Observacion_Pai.
     */
    private Set<Observacion_Pai> set_Observacion_Pai = new HashSet<Observacion_Pai>();

    /**
     * Getter for property set_Observacion_Pai.
     * @return Value of property set_Observacion_Pai.
     */
    public Set<Observacion_Pai> getSet_Observacion_Pai() {
        return this.set_Observacion_Pai;
    }

    /**
     * Setter for property set_Observacion_Pai.
     * @param set_Observacion_Pai New value of property set_Observacion_Pai.
     */
    public void setSet_Observacion_Pai(Set<Observacion_Pai> set_Observacion_Pai) {
        this.set_Observacion_Pai = set_Observacion_Pai;
    }

    /**
     * Add an element to set property set_Observacion_Pai
     * and sets elements's property pai.
     * @param element New element to be added to set_Observacion_Pai.
     */
    public void addToSet_Observacion_Pai(Observacion_Pai element) {
        element.setPai(this);
        set_Observacion_Pai.add(element);
    }

    /**
     * Removes and old element from set set_Observacion_Pai
     * and sets element's property pai to null.
     * @param old The element to be removed from set_Observacion_Pai
     */
    public void removeFromSet_Observacion_Pai(Observacion_Pai old) {
        set_Observacion_Pai.remove(old);
        old.setPai(null);
    }
    /**
     * Holds value of property set_Pago.
     */
    private Set<PaiPago> set_Pago = new HashSet<PaiPago>();

    /**
     * Getter for property set_Pago.
     * @return Value of property set_Pago.
     */
    public Set<PaiPago> getSet_Pago() {
        return this.set_Pago;
    }

    /**
     * Setter for property set_Pago.
     * @param set_Pago New value of property set_Pago.
     */
    public void setSet_Pago(Set<PaiPago> set_Pago) {
        this.set_Pago = set_Pago;
    }

    /**
     * Add an element to set property set_Pago
     * and sets elements's property pai.
     * @param element New element to be added to set_Pago.
     */
    public void addToSet_Pago(PaiPago element) {
        element.setPai(this);
        set_Pago.add(element);
    }

    /**
     * Removes and old element from set set_Pago
     * and sets element's property pai to null.
     * @param old The element to be removed from set_Pago
     */
    public void removeFromSet_Pago(PaiPago old) {
        set_Pago.remove(old);
        old.setPai(null);
    }



    public String toString() {
        return "<Pai id='C" + this.id +
      //idPai
      "\" fec_Ini =\"" + fec_Ini +
      "\" fec_Fin =\"" + fec_Fin +
      "\" articulo8 =\"" + articulo8 +
        ((profesor==null) ? "" : "\" profesor =\"C" + profesor.getId()) +

      //set_Resolucion
      //set_Observacion_Pai
      //set_Pago

        "'/>";
    }

}